package proto;
import javafx.async.JavaTaskBase;
import javafx.async.RunnableFuture;

public class CounterTask extends JavaTaskBase{
    public-init var startValue:Long = 0;
    public-init var endValue:Long = 10000;

    var backingTask:CounterTaskFuture;

    init{
        backingTask = new CounterTaskFuture(startValue, endValue);
    }

    override protected function create () : RunnableFuture {

        backingTask;
    }
}

function run() {
    var task = CounterTask {startValue:10, endValue:100};
    task.start();
}
